package com.newzqxq.koalamoney.model;

import com.newzqxq.koalamoney.entity.RegisterBean;
import com.newzqxq.koalamoney.net.AppService;

import javax.inject.Inject;

import happyloan.core.EventBusUtil;

/**
 * Created by ZQXQ-Developer on 2017/7/24.
 */

public class RegisterModel {
    private AppService service;

    @Inject
    RegisterModel(AppService service) {
        this.service = service;
    }

    public void sendCode(String tel, int code_type) {
        EventBusUtil<String> util = new EventBusUtil<>();
        util.sendEvent4Call(service.sendCode(tel, code_type));
    }

    public void register(String tel, String sms, String password, int type) {
        EventBusUtil<RegisterBean.DataBean> util = new EventBusUtil<>();
        util.sendEvent4Call(service.register(tel, sms, password, type));
    }

}
